package at.spengergasse.abifs.SDJPATest.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@NamedQuery(name="TrainingGroup.findByID", query="select tg from TrainingGroup tg where tg.tg_id = ?1")
@Table
public class TrainingGroup implements Serializable
{

	private static final long serialVersionUID = 1607271095732614442L;
	
	@Column(name = "tg_id")
	@Id
	@GeneratedValue
	private Long tg_id;
	
	@Column(name = "tg_desc")
	private String tg_desc;
	
	@Column(name = "tg_type")
	private String tg_type;
	
	@Column(name = "tg_launch")
	private Date tg_launch;
	
	@Column(name = "tg_c_id")
	private Long tg_c_id;
	
	@ManyToOne
	@JoinColumn(name = "tg_c_id", insertable=false,updatable=false)
	private Coach coach;
	
	
	public Long getID()
	{
		return tg_id;
	}
	
	public void setID(Long tg_id)
	{
		this.tg_id = tg_id;
	}
	
	public String getDesc()
	{
		return tg_desc;
	}
	
	public void setDesc(String tg_desc)
	{
		this.tg_desc = tg_desc;
	}
	
	public String getType()
	{
		return tg_type;
	}
	
	public void setType(String tg_type)
	{
		this.tg_type = tg_type;
	}
	
	public Date getLaunch()
	{
		return tg_launch;
	}
	
	public void setLaunch(Date tg_launch)
	{
		this.tg_launch = tg_launch;
	}
	
	public Long getCID()
	{
		return tg_c_id;
	}
	
	public void setCID(Long tg_c_id)
	{
		this.tg_c_id = tg_c_id;
	}
	
	public Coach getCoach()
	{
		return coach;
	}
	
	
	

}
